package iq.logger;

import  org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
 /**
  * Commons-logging 与 log4j结合使用
  * 配置commons-logging.properties文件 org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
  * @author dingdahai
  *
  */
public class CommonsLog {
    private static Log log = LogFactory.getLog(CommonsLog.class);
    public void log(){
       log.debug("Debug info.");
       log.info("Info info");
       log.warn("Warn info");
       log.error("Error info");
       log.fatal("Fatal info");
       
    }
    public static void main(String[] args) {
       CommonsLog test = new CommonsLog();
       test.log();
    }
}